import Utils from "@/utils/utils.js"
//修改密码
export function updatePwd(oldPassword, newPassword) {
	return new Promise((resolve, reject) => {
		Utils.baseRequest({
			url: `mobile/updatePwd?oldPassword=${oldPassword}&newPassword=${newPassword}`,
			method: "PUT",
		}).then(res => {
			resolve(res.data)
		}, err => {
			reject(err)
		})
	})
}

//重置密码
export function resetPwd(newPassword) {
	return new Promise((resolve, reject) => {
		Utils.baseRequest({
			url: `mobile/resetPwd?newPassword=${newPassword}`,
			method: "PUT",
		}).then(res => {
			resolve(res.data)
		}, err => {
			reject(err)
		})
	})
}